-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add fake-ipa #14
✨ Add fake-ipa #14
Conversation
2191589
to
8dd3547
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Please don't forget to add the documentation and the docker file.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Rozzii The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
89cc32e
to
d6aa256
Compare
/cc @elfosardo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't finish reading it all, left some comments to start
2e52de1
to
df4ddcf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially found this error, but perhaps something else is wrong as my test didn't pass. Will come back with more reviews
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us create a new repository. utility-images is for, well, utility images, and this is a larger project that can be useful outside of Metal3 even.
For now, our priority is to merge the Sushy tools patch. Let's close that long-running case there first, where we still get questions about the use case. That's the thing that really confounds me, wondering if even the Ironic community will make any use of that, rather than outside communities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions and questions
app.logger.info("Received system update for %s: %s", system_name, system) | ||
|
||
# Check if 'pending_power' is present and not None or empty | ||
if 'pending_power' not in system or not system['pending_power']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this pending_power
set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coming from sushy-tools notifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you point me to the specific location? I cannot find it anywhere, sushy-tools checks this, sure, but it never sets it.
In my trial, this if
case prevents fake-ipa to ever response to any boot request, because pending_power
is never set in the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding power state you are not supposed to send it directly to fakeIPA but only sushy-tools notify it with some here where it is set in the sushy-tools: https://opendev.org/openstack/sushy-tools/src/commit/c5b64a27e1e7ea1a2e5b7490633353f5649ad297/sushy_tools/emulator/resources/systems/fakedriver.py#L142
df4ddcf
to
b2f4c81
Compare
b2f4c81
to
ebee93f
Compare
I just put a hold here, please remove the hold after all the questions have been answered |
/hold |
Signed-off-by: Mohammed Boukhalfa <[email protected]>
ebee93f
to
4e42ef5
Compare
fake-ipa/README.md
Outdated
|
||
1. clone the env scripts `cd` inside `fake-ipa/Run-env` folder | ||
2. check configs in `config.py` | ||
3. run init `./Init-environment.sh` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, let's not have the third? forth? place where we have virtual machine initialization code. Fake IPA should be integrated as an option to metal3-dev-env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid this will add complexity to dev-env and will be hard to understand this is more simple env where we can easily changes and light weight to run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but the crux here is whether you're adding something that only you will be able to use and maintain (then why not personal github) or something that community members will be able to use 1 years from this point while you're on vacation.
We already have a bunch of useful scripts in BMO like run_local_ironic.sh
that need to be fixed every time someone is trying them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Dmitry. In the long run this setup should be put somewhere it could be maintained and tested. Dev-env is a good place.
I could live with putting the setup here though, but it needs to be improved. The current state is pretty experimental, and difficult to follow. IMO we could just remove the setup part from this PR, and make some PoC PR where you show how it works. We then can improve from that, and make a "proper" setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree with Dmitry. I was starting to review the scripts and then I realized that I was having a "deja-vu". This should definitely look better in metal3-dev-env, or at least connected to it in some way to avoid duplication, confusion, or even possible conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a PR to run fakeIPA on the dev-env metal3-io/metal3-dev-env#1450
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed the full Python code, but I believe I've looked at it enough times. The pressing issues now are:
- Fake IPA is not an utility image.
- The whole Run-env thing duplicates in parts metal3-dev-env, and our e2e tests, and who knows what else. Let's integrate the new project in metal3-dev-env since that's the place we already have?
fake-ipa/README.md
Outdated
|
||
1. clone the env scripts `cd` inside `fake-ipa/Run-env` folder | ||
2. check configs in `config.py` | ||
3. run init `./Init-environment.sh` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree with Dmitry. I was starting to review the scripts and then I realized that I was having a "deja-vu". This should definitely look better in metal3-dev-env, or at least connected to it in some way to avoid duplication, confusion, or even possible conflicts.
FYI sushy-tools 1.3.0 includes the necessary patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the large number of nits, but please configure your editor to lint for you, or run linters manually. Makes reviewing easier when everyone else's editors don't vomit thousand warnings opening up the files.
7613314
to
6ce2df5
Compare
6ce2df5
to
b822764
Compare
Signed-off-by: Mohammed Boukhalfa <[email protected]>
b822764
to
fa61478
Compare
This was discussed in the 2024-09-04 community meeting, where it was agreed to merge the PR for now, with the option to move it to a dedicated repository later if needed. We can also coordinate the creation of a new repo along with other related work, such as metal3-io/cluster-api-provider-metal3#1610, which could live together with fakeIPA. |
/hold cancel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I don't like this code placed in utility-images but I promised not to block it.
Add FakeIPA tool.
To run the FakeIPA check this PR on the Dev-Env metal3-io/metal3-dev-env#1450